package com.esir.harmony.base;

import com.esir.harmony.base.slice.MainAbilitySlice;
import com.esir.harmony.bus.LiveBus;
import com.esir.harmony.bus.rxharmony.Subscribe;
import com.esir.harmony.bus.rxharmony.ThreadMode;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;

public class MainAbility extends Ability {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setMainRoute(MainAbilitySlice.class.getName());
        LiveBus.with("").postValue("");
    }

    /**
     * 接收事件
     * @param rxbusEvent
     */
    @Subscribe(threadMode = ThreadMode.MAIN)
    public void rxBusRxbusEvent(Object rxbusEvent) {
        if (rxbusEvent == null) {
            return;
        }
        //执行对应操作
    }
}
